home *** CD-ROM | disk | FTP | other *** search
-
-
-
- TTTTiiiieeee::::::::HHHHaaaannnnddddlllleeee((((3333)))) TTTTiiiieeee::::::::HHHHaaaannnnddddlllleeee((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- Tie::Handle - base class definitions for tied handles
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- package NewHandle;
- require Tie::Handle;
-
- @ISA = (Tie::Handle);
-
- sub READ { ... } # Provide a needed method
- sub TIEHANDLE { ... } # Overrides inherited method
-
-
- package main;
-
- tie *FH, 'NewHandle';
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- This module provides some skeletal methods for handle-tying classes. See
- the _p_e_r_l_t_i_e manpage for a list of the functions required in tying a
- handle to a package. The basic TTTTiiiieeee::::::::HHHHaaaannnnddddlllleeee package provides a new
- method, as well as methods TIESCALAR, FETCH and STORE. The new method is
- provided as a means of grandfathering, for classes that forget to provide
- their own TIESCALAR method.
-
- For developers wishing to write their own tied-handle classes, the
- methods are summarized below. The the _p_e_r_l_t_i_e manpage section not only
- documents these, but has sample code as well:
-
- TIEHANDLE classname, LIST
- The method invoked by the command tie *glob, classname. Associates a
- new glob instance with the specified class. LIST would represent
- additional arguments (along the lines of the _A_n_y_D_B_M__F_i_l_e manpage and
- compatriots) needed to complete the association.
-
- WRITE this, scalar, length, offset
- Write _l_e_n_g_t_h bytes of data from _s_c_a_l_a_r starting at _o_f_f_s_e_t.
-
- PRINT this, LIST
- Print the values in _L_I_S_T
-
- PRINTF this, format, LIST
- Print the values in _L_I_S_T using _f_o_r_m_a_t
-
- READ this, scalar, length, offset
- Read _l_e_n_g_t_h bytes of data into _s_c_a_l_a_r starting at _o_f_f_s_e_t.
-
- READLINE this
- Read a single line
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- TTTTiiiieeee::::::::HHHHaaaannnnddddlllleeee((((3333)))) TTTTiiiieeee::::::::HHHHaaaannnnddddlllleeee((((3333))))
-
-
-
- GETC this
- Get a single character
-
- DESTROY this
- Free the storage associated with the tied handle referenced by _t_h_i_s.
- This is rarely needed, as Perl manages its memory quite well. But
- the option exists, should a class wish to perform specific actions
- upon the destruction of an instance.
-
- MMMMOOOORRRREEEE IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
- The the _p_e_r_l_t_i_e manpage section contains an example of tying handles.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-